package com.tengju.data.domain.model.report;

import lombok.Getter;

import java.util.Arrays;

/**
 * @author chenhang
 * @Date 2021/1/26
 */
@Getter
public enum TeamRatioType {

    TYPE0(25,"0类",50),
    TYPE2(160,"2类",40),
    TYPE4(41,"4类",30),
    TYPE8(156,"8类",20),
    TYPE16(23,"16类",10),
    TYPE16_2(24,"同16类",8),
    TYPE0_2(26,"同0类",6);

    private int type;
    private String name;
    private int order;

    TeamRatioType(int type, String name, int order) {
        this.type = type;
        this.name = name;
        this.order = order;
    }

    public static TeamRatioType parseByType(int type) {
        return Arrays.stream(TeamRatioType.values())
                .filter(k -> k.getType() == type)
                .findFirst().orElse(null);
    }


}
